<?php
class Merchant_Model_Validate_Rm1Validate extends Merchant_Model_Validate_CommonValidate{

    public function validator(){
		$this->PublicValidator();
		$this->orderProduct();			//物品描述
		$this->consigneeRegion();		//收件人州
		$this->consigneeCity();
		$this->consigneeZip();
		$this->consigneePhone();
				
        return $this->_error;
    }

    public function shippingMethod(){}
    public function consigneeCountryId(){}
    public function address(){}
	
	//收件人城市
	public function consigneeCity(){
        $regex = array('name' => '收件人城市','value' => $this->consignee_city,'regex' => array('length[1,255]','noCharacter'));
		$error = Default_Service_Validator::Validator($regex);
		if(!empty($error)){
			$this->_error[] = $error ;
		}
	}
	
	//邮编
	public function zipCode(){
		$regex = array('name' => '收件邮编','value' => $this->consignee_zip,'regex' => array('length[0,32]','noCharacter','require'));
		$error=Default_Service_Validator::Validator($regex);
		if(!empty($error)){
			$this->_error[] = $error ;
		}
	}
    
	//电话
	public function consigneePhone(){
 		$regex = array('name' =>  '电话号码','value' => $this->consignee_phone,'regex' => array('length[0,20]','noCharacter'));
		$error = Default_Service_Validator::Validator($regex);
		if(!empty($error)){
			$this->_error[] = $error ;
		}
	}
    
}
?>